
import java.io.*;
import java.util.Arrays;

/*
ID: huangmingbo
LANG: JAVA
TASK: milk3
 */
public class milk3 {

    private static int LEN = 3;
    private static int[] caps = new int[LEN];

    private static boolean[][][] states = new boolean[20 + 1][20 + 1][20 + 1];
    private static boolean[] bnum = new boolean[20 + 1];

    public static void main(String[] args) throws IOException {

        try (
                BufferedReader reader = new BufferedReader(new InputStreamReader(milk3.class.getResourceAsStream(milk3.class.getSimpleName() + ".in")));
                PrintWriter writer = new PrintWriter(new FileWriter(milk3.class.getSimpleName() + ".out"));
        ) {

            read(reader);
            initstates();
            forceDeal();
            print(writer);


        }
    }

    private static void forceDeal() {
        forceDeal(0, 0, caps[2]);
    }

    private static void read(BufferedReader reader) throws IOException {
        String[] arr = reader.readLine().split(" ");
        for (int i = 0; i < arr.length; i++) {
            caps[i] = Integer.parseInt(arr[i]);
        }
    }

    private static void print(PrintWriter writer) {
        boolean first = true;
        for (int i = 0; i < bnum.length; i++) {
            if (!bnum[i]) {
                continue;
            }

            if (!first) {
                writer.print(" ");
            }

            writer.print(i);
            first = false;
        }

        if (!first) {
            writer.println();
        }
    }

    private static void forceDeal(int a, int b, int c) {
        if (states[a][b][c]) {
            return;
        }

        states[a][b][c] = true;
        if (!bnum[c] && a == 0) {
            bnum[c] = true;
        }

        int tmp;
        int[] real = new int[]{a, b, c};
        for (int from = 0; from < LEN; from++) {
            for (int to = 0; to < LEN; to++) {
                if (from != to && real[to] < caps[to] && real[from] > 0) {
                    tmp = real[from];
                    real[from] = Math.max(real[from] + real[to] - caps[to], 0);
                    real[to] = Math.min(tmp + real[to], caps[to]);
                    forceDeal(real[0], real[1], real[2]);
                    real[0] = a;
                    real[1] = b;
                    real[2] = c;
                }
            }
        }
    }


    private static void initstates() {

        for (int i = 0; i < states.length; i++) {
            states[i] = new boolean[21][];
            for (int j = 0; j < states[i].length; j++) {
                states[i][j] = new boolean[21];
            }
        }

    }
}
